package de.uni.kassel.campusappver3.view;

import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import de.uni.kassel.campusappver3.R;

public class MapActivitySeekBarChanger implements OnTouchListener{
	MapActivity map;
	MapActivitySeekBarChanger(MapActivity map){
		super();
		this.map = map;
	}

	@Override
	public boolean onTouch(View v, MotionEvent event) {
		int progress = MapActivity.bar.getProgress();
		switch(progress) {
		case 0: 
			map.setImage(R.drawable.newuni_basement, R.id.map, false);
			map.level = progress;
			break;
		case 1: 
			map.setImage(R.drawable.newuni_eg, R.id.map, false);
			map.level = progress;
			break;
		case 2:
			map.setImage(R.drawable.newuni_1, R.id.map, false);
			map.level = progress;
			break;
		case 3: 
			map.setImage(R.drawable.newuni_2, R.id.map, false);
			map.level = progress;
			break;
		default: break;
		}
		MapActivity.tempbm = null;
		return false;
	}

}
